<div class="selectMatrial">
  <div class="MatrialType ">
    <div class="card">
      <div class="fitter">
        <input dTextInput placeholder=""name="searchDepartmentValue" (input)="searchDepartment($event)" />
      </div>
      <div class="card-body">
        <d-tree #basicTree [tree]="displayTreeData"   [treeNodeTitleKey]="'customerClassName'"   [treeNodeChildrenKey]="'subCustomerClasses'"  (afterTreeInit)="afterTreeInit($event)"
        (nodeSelected)="nodeSelected($event)">
        </d-tree>
      </div>
    </div>
  </div>
  <div class="Matrial">
    <div class="d-input">
      <input dTextInput style="width: 180px;" [error]="false" placeholder="客户编码/中文全名/联络对象/电话"
      [(ngModel)]="filter.SearchTerm" name="SearchTerm">
      <d-button id="primaryBtn" style="margin-left: 8px" (click)="search()"><i class="icon icon-filter-o me-2" ></i>查询</d-button>
      <d-button bsStyle="common" style="margin-left: 8px" (click)="reset()"><i class="icon icon-refresh me-2"></i>重置</d-button>
    </div>
    <div class="mt-3">
      <d-data-table [lazy]="true" [dataSource]="tabledata"
         [scrollable]="true" [fixHeader]="true" [maxHeight]="tableheight" [resizeable]="true" [tableOverflowType]="'auto'" [scrollable]="true" [resizeable]="true" [colDraggable]="true" [tableWidthConfig]="tableWidthConfig">
            <thead dTableHead >
                <tr dTableRow >
                  <th dHeadCell   *ngFor="let colOption of dataTableOptions.columns">{{ colOption.header }}
                  </th>
                </tr>
            </thead>
            <tbody dTableBody>
              <ng-template let-rowItem="rowItem" let-rowIndex="rowIndex" let-nestedIndex="nestedIndex">
                <tr dTableRow>
                <td dTableCell [fixedLeft]="'0px'">
                  <label class="custom-radio">
                    <input #radioInput type="radio"
                    (change)="radio($event,rowItem)" >
                      <span class="checkmark"></span>
                  </label>
                </td>
                <td dTableCell [rowItem]="rowItem" >
                  <span dTooltip [content]="rowItem?.customerNum">{{rowItem?.customerNum}}</span>
                </td>
                <td dTableCell [rowItem]="rowItem" >
                  <span  dTooltip [content]="rowItem?.chineseName">{{rowItem?.chineseName}}</span>
                </td>
                <td dTableCell [rowItem]="rowItem">
                  <span dTooltip [content]="rowItem?.customerAbbreviation">{{rowItem?.customerAbbreviation}}</span>
                </td>
              </tr>
            </ng-template>
          </tbody>
      </d-data-table>
    </div>
    <div class="page-footer">
      <d-pagination
        [size]="'sm'"
        [canViewTotal]="true"
        [canChangePageSize]="true"
        [maxItems]="5"
        [total]="this.pager.total"
        [pageSizeOptions]="this.pageSizeOptions"
        [(pageSize)]="pager.pageSize"
        [(pageIndex)]="pager.pageIndex"
        (pageIndexChange)="pageIndexChange()"
        (pageSizeChange)="pageSizeChange()"
      >
      </d-pagination>
    </div>
  </div>

</div>

